<?php

namespace Common\Model;

class TixianModel extends BaseModel {

  var $userObj;
  public function __construct($name = '', $tablePrefix = '', $connection = '') {
    parent::__construct($name, $tablePrefix, $connection);
    $this->userObj = M("Tixian");
  }

  /**
   * 查询提现列表(有分页)
   * @param array $where 搜索条件
   * @return array 列表 分页
   */
  public function userList($where, $last = 0) {
    $count = $this->userObj->where($where)->count();
    $pageInfo = $this->getPageInfo($last, $count);
    $list = $this->userObj->where($where)->order('id desc')->limit($pageInfo['last'] . ',' . $pageInfo['listNum'])->select();
    return array('list' => $list, 'page' => $pageInfo['page']);
  }

}
